﻿using System;
using YunZuan.Models.Attributes;
using YunZuan.Models.Entities;

namespace Retail.Models.DBModels
{
    [Table(TableName = "index_articles", PrimaryKey = "ID")]
    public class Index_Articles : BaseEntity
    {
        public Index_Articles()
        { }
        #region Model
        private int _id;
        /// <summary>
        ///
        /// </summary>
        [Column(IsAutoIncrement = true)]
        public int ID
        {
            get { return _id; }
            set { this.ChangeNotify<int>("ID", value, ref _id); }
        }
        private int? articlesTypeID;
        /// <summary>
        ///0 公司新闻 1 行业新闻 2 常见问题
        /// </summary>
        public int? ArticlesTypeID
        {
            get { return articlesTypeID; }
            set { this.ChangeNotify<int?>("ArticlesTypeID", value, ref articlesTypeID); }
        }
        private string _title;
        /// <summary>
        ///新闻标题
        /// </summary>
        public string Title
        {
            get { return _title; }
            set { this.ChangeNotify<string>("Title", value, ref _title); }
        } 
        private string _content;
        /// <summary>
        ///内容，可html
        /// </summary>
        public string Content
        {
            get { return _content; }
            set { this.ChangeNotify<string>("Content", value, ref _content); }
        }
        private DateTime _issuetime;
        /// <summary>
        ///发布时间
        /// </summary>
        public DateTime IssueTime
        {
            get { return _issuetime; }
            set { this.ChangeNotify<DateTime>("IssueTime", value, ref _issuetime); }
        }
        private bool? _isenable ;
        /// <summary>
        ///
        /// </summary>
        public bool? IsEnable
        {
            get { return _isenable; }
            set { this.ChangeNotify<bool?>("IsEnable", value, ref _isenable); }
        }
        private int? _sort;
        /// <summary>
        ///新闻排序
        /// </summary>
        public int? Sort
        {
            get { return _sort; }
            set { this.ChangeNotify<int?>("Sort", value, ref _sort); }
        }
        private string _comment;
        /// <summary>
        ///回复或评论
        /// </summary>
        public string Comment
        {
            get { return _comment; }
            set { this.ChangeNotify<string>("Comment", value, ref _comment); }
        }
        private DateTime _addtime;
        /// <summary>
        ///
        /// </summary>
        public DateTime AddTime
        {
            get { return _addtime; }
            set { this.ChangeNotify<DateTime>("AddTime", value, ref _addtime); }
        }
        public string ArticlesTypeName { get; set; }
        #endregion
    }
}
